#!/usr/bin python3
# -*- coding: utf-8 -*-


class Game:
    def __init__(self, n, m, k, p_i: list):
        self._n = n
        self._m = m
        self._k = k
        self._p_i = p_i

    def run(self):
        childs = [i for i in range(1, self._n + 1)]
        poped = []
        index = self._m
        for i in range(self._k):
            poped.append(childs[index - 1])
            temp_left = childs[0: index - 1]
            temp_right = childs[index:]
            add = [i for i in range(self._n + 1, 1 + self._n + self._p_i[i])]
            self._n += self._p_i[i]
            childs = temp_left + add + temp_right
            index += self._m - 1
            if index > len(childs):
                index -= len(childs)
        return poped


if __name__ == '__main__':
    s1 = [int(i) for i in input().split(' ')]
    n, m, k = s1

    p_i = []
    for i in range(k):
        p_i.append(int(input()))

    m_game = Game(n, m, k, p_i)
    res = m_game.run()
    for i in res:
        print(i)
